import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue';

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
    meta: {
      title: '个人博客首页'
    }
  },
  // 内容页
  {
    path: '/blogContent',
    name: 'blogContent',
    component: () => import('@/views/blogContentView'),
    meta: {
      title: '欢迎浏览和学习'
    }
  },
  {
    path: "/timeStamp",
    name: "timeStamp",
    component: () => import('@/views/timeStampView'),
    meta: {
      title: '时间一去不复返'
    }
  },
  // 分类页
  {
    path: "/sortView",
    name: "sortView",
    component: () => import('@/views/sortView'),
    meta: {
      title: '想看什么就看什么'
    }
  },
  // 留言板
  {
    path: "/messageBoard",
    name: "messageBoard",
    component: () => import('@/views/messageBoardView'),
    meta: {
      title: '写下你的建议吧~'
    }
  },
  // 搜索页searchView
  {
    path: "/searchView",
    name: "searchView",
    component: () => import('@/views/searchView'),
    meta: {
      title: '快搜搜有没有你想要的~'
    }
  },
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
